package com.sf.obserable;

/**
 * @author 埔枘
 * @date 2019/12/04
 **/
public class Student {

    public static void main(String[] args) {
        Teacher teacher = new Teacher();
        teacher.setName("张老师");

        Iky iky = Iky.getInstance();
        iky.addObserver(teacher);

        Question question = new Question();
        question.setContent("java 是什么？");
        question.setName("筱筱");

        iky.pushMessage(question);
    }
}
